<html>
<head>
    <%@ page language="java" import="java.util.*" contentType="text/html;charset=utf-8"%>
    <script type="text/javascript" src="javascripts/jquery/jquery.js"></script>



</head>
<body>
web管理员后台免登验证<br/>
    name: <span id="userName"></span> <br/>
    userId: <span id="userId"></span>

</body>
</html>
<script type="text/javascript">
    <%
        String code = request.getParameter("code");
    %>
    var jsonObject = <%=com.alibaba.dingtalk.openapi.demo.auth.AuthHelper.getAdministrator(code)%>;
    if(jsonObject.errcode == 0) {
        $("#userName").html(jsonObject.user_info.name);
        $("#userId").html(jsonObject.user_info.userid);
    } else {
        alert(jsonObject.errmsg);
    }

</script>